
// Ahmad Salama & Amine Allaouchiche
//

#include <iostream>
#include "nodedata.h"

using namespace std;

struct EdgeNode { 
	int adjGraphNode;      // subscript of the adjacent graph node 
	EdgeNode* nextEdge; 
}; 

struct GraphNode {        // structs used for simplicity, use classes if desired 
	EdgeNode* edgeHead;    // head of the list of edges  
	bool visited;
	NodeData* data;
	int index;
};



class GraphL { 
	public: 

		//Constructor:-----------------------------------------------------------------
		GraphL();

		//Destructor:------------------------------------------------------------------
		GraphL(int, string*);

		//buildGraph:------------------------------------------------------------------
		~GraphL();

		//breadthFirst:----------------------------------------------------------------
		void buildGraph(ifstream&);

		//displayGraph:----------------------------------------------------------------
		void displayGraph(); 

		//depthFirstSearch:------------------------------------------------------------
		void depthFirstSearch();

		//insertEdge:------------------------------------------------------------------
		void insertEdge(int, int);

	private:

		//Data Members:		
		GraphNode* graphNodes;
		int size;

		//Helpers:

		//getCount():------------------------------------------------------------------
		int getCount();

		//breadthFirst:----------------------------------------------------------------
		void breadthFirst(GraphNode*);	  
}; 
